package com.lagou.rabbitmq.exception;

public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private Integer code;

    /**
     * 错误消息
     */
    private String message;

    public BaseException(Integer code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public BaseException(String message)
    {
        this(null, message);
    }

    public String getDefaultMessage()
    {
        return message;
    }
}